using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DataStructure
{
    public class RBT1Set<T> : ISet<T> where T : IComparable<T>
    {
        private RBT1<T> _rbt;
        
        public RBT1Set()
        {
            _rbt = new RBT1<T>();
        }
        public int Count => _rbt.Count;

        public bool IsEmpty => _rbt.IsEmpty;

        public void Add(T t)
        {
            _rbt.Add(t);
        }

        public bool Contains(T t)
        {
            return _rbt.Contains(t);
        }

        public void Remove(T t)
        {
            Console.WriteLine("未实现");
            throw new NotImplementedException();
        }
        public int MaxHeight()
        {
            return _rbt.MaxHeight();
        }
    }
}